﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class TravelGuideController
    {
        public int InsertTravelGuide(TravelGuideInfo info)
        {
            return SQL.InsertTravelGuide(info.Avatar, info.FullName, info.Birthday, info.Gender, info.Phone, info.Email, info.Info, info.IdentityCard, info.Level, info.Languages, info.Facebook, info.GooglePlus, info.Twitter, info.ContinentId, info.NationalId, info.CityId, info.DistrictId,info.WardId, info.Address, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status);
        }
        public void UpdateTravelGuide(TravelGuideInfo info)
        {
            SQL.UpdateTravelGuide(info.TravelGuideId, info.Avatar, info.FullName, info.Birthday, info.Gender, info.Phone, info.Email, info.Info, info.IdentityCard, info.Level, info.Languages, info.Facebook, info.GooglePlus, info.Twitter, info.ContinentId, info.NationalId, info.CityId, info.DistrictId, info.WardId, info.Address, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status);
        }
        public void DeleteTravelGuide(TravelGuideInfo info)
        {
            DeleteTravelGuide(info.TravelGuideId);
        }
        public void DeleteTravelGuide(int travelGuideId)
        {
            SQL.DeleteTravelGuide(travelGuideId);
        }
        public TravelGuideInfo GetTravelGuide(int travelGuideId)
        {
            return CBO.FillObject<TravelGuideInfo>(SQL.GetTravelGuide(travelGuideId));
        }
        public List<TravelGuideInfo> ListTravelGuide()
        {
            return CBO.FillCollection<TravelGuideInfo>(SQL.ListTravelGuide());
        }
        public DataTable SelectTravelGuide()
        {
            return CBO.ConvertToDataTable(ListTravelGuide(), typeof(TravelGuideInfo));
        }

    }
}
